package cn.wjc.demo.common.page;

import lombok.Getter;
import lombok.Setter;

@Setter
@Getter
public class PageQuery {

    /**
     * 起始页码
     */
    private Long pageNum;

    /**
     * 每页条数
     */
    private Long pageSize;

    /**
     * 获取起始页码，默认为1
     *
     * @return pageNum
     */
    public Long getPageNum() {
        if (pageNum == null) {
            pageNum = 1L;
        }
        return pageNum;
    }

    /**
     * 获取每页大小，默认为10
     *
     * @return pageSize
     */
    public Long getPageSize() {
        if (pageSize == null) {
            pageSize = 10L;
        }
        return pageSize;
    }
}
